home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************/
- /* */
- /* ConfigYam.rexx */
- /* Copyright ©1997 by Dick Whiting */
- /* */
- /*----------------------------------------------------------------------------*/
- /* This version requires MuiRexx 3.0a+ */
- /*----------------------------------------------------------------------------*/
- /* This allows you to easily modify the order of folders in the Yam config, */
- /* rename the actual mail folders, and edit other entries. Now provides an */
- /* easy way of modifying filters and their order. */
- /* */
- /* !!KNOW WHAT YOU ARE DOING!!! */
- /* */
- /* Turn on 'help bubbles' and USE them!! */
- /* */
- /*----------------------------------------------------------------------------*/
- /* Select the configuration file, use drag-and-drop to reorder the lists, */
- /* edit as allowed. */
- /*----------------------------------------------------------------------------*/
- /* */
- /* Standard Disclaimer: I wrote it, it works for me, I don't guarantee */
- /* that it will do anything productive for anyone else, etc. etc. ;-) */
- /* */
- /*HOWEVER, if you DO find a use for it: I homeschool my kids and they */
- /*would love a postcard from where EVER you live. */
- /* */
- /*Instant GEOGRAPHY lesson;) */
- /* */
- /* */
- /*POSTCARDS: Dick Whiting */
- /* 28590 S. Beavercreek Rd. */
- /* Mulino, Oregon 97042 */
- /* USA */
- /* */
- /*----------------------------------------------------------------------------*/
- /* */
- /* Address Bug Reports or Comments to: */
- /* Dick Whiting <dwhiting@europa.com> */
- /* 28 August 1997 */
- /* */
- /******************************************************************************/
- /*
- $VER: 1.2 Copyright ©1997 by Dick Whiting
- $AUTHOR: Dick Whiting
- $DESCRIPTION: Quick config changes for Yam.
- */
-
- options results
- options failat 21
-
- parse arg mainparm subparm
-
- /**************************************************************************/
- /* Initialize Variables */
- /**************************************************************************/
- Call MUIvars /* go define vars for MUI use */
- Call CYvars /* various values used in CY */
- Call Helpvars /* pointers into HELP guide */
- Call Localize /* vars for localizing strings*/
- Call Builtvars /* built using previous values*/
-
- Address CONFIGYAM
-
- Select
- when mainparm='' then do
- Call CheckDup
- Call BuildWindow
- end
- when mainparm='LOAD' then do
- Call LoadConfig
- end
- when mainparm='DELETEFLD' then do
- Call DeleteFlds
- end
- when mainparm='EDITFLD' then do
- Call EditFlds
- end
- when mainparm='INSERTFLD' then do
- Call InsertFlds
- end
- when mainparm='STOREFLD' then do
- Call StoreFlds
- end
- when mainparm='DELETERUL' then do
- Call DeleteRuls
- end
- when mainparm='EDITRUL' then do
- Call EditRuls
- end
- when mainparm='INSERTRUL' then do
- Call InsertRuls
- end
- when mainparm='STORERUL' then do
- Call StoreRuls
- end
- when mainparm='DELETEMAIN' then do
- Call DeleteMain
- end
- when mainparm='EDITMAIN' then do
- Call EditMain
- end
- when mainparm='INSERTMAIN' then do
- Call InsertMain
- end
- when mainparm='STOREMAIN' then do
- Call StoreMain
- end
- when mainparm='SAVE' then do
- Call SaveConfig
- end
- when mainparm='SAVEAS' then do
- Call GetFileName
- Call SaveConfig
- end
- when mainparm='QUIT' then do
- 'quit'
- end
- otherwise do
- errmsg=_text._badparm
- Call ErrorMsg
- end
- end
-
- exit
-
- /**************************************************************************/
- /* Load the config file into the lists */
- /**************************************************************************/
- LoadConfig:
-
- popasl ID CYCFG
- mfile=result
-
- infotext=_text._loadfile
- infobuttons=''
- showbusy=TRUE
- Call InfoWindow
-
- method ID CYALL MUIM_List_Clear
- method ID CYRLL MUIM_List_Clear
- method ID CYFLD MUIM_List_Clear
-
- fldfound=FALSE
- rulfound=FALSE
-
- if open('IN',mfile,'R') then do
- do until eof('IN')
- linein=readln('IN')
- Select
- when upper(substr(linein,1,6))='FOLDER' then do
- oldnum=word(linein,1)
- oldnum=substr(oldnum,7)
- parse var linein folder '=' linein
- linein=translate(linein,',',';')
- linein=linein||','||oldnum
- list ID CYFLD INSERT POS MUIV_List_Insert_Bottom STRING linein
- if ~fldfound then do
- list ID CYALL INSERT POS MUIV_List_Insert_Bottom STRING '='_text._fldheader
- fldfound=TRUE
- end
- end
- when upper(substr(linein,1,4))='RULE' then do
- parse var linein rule '=' linein
- linein=translate(linein,',',';')
- linein=strip(linein,'B')
- list ID CYRLL INSERT POS MUIV_List_Insert_Bottom STRING linein
- if ~rulfound then do
- list ID CYALL INSERT POS MUIV_List_Insert_Bottom STRING '='_text._rulheader
- rulfound=TRUE
- end
- end
- otherwise do
- list ID CYALL INSERT POS MUIV_List_Insert_Bottom STRING '='linein
- end
- end
- end
- foo=close('IN')
- window ID CYINF close
- end
- else do
- errmsg=_text._badfile
- Call ErrorMsg
- exit
- end
-
- Return
-
- /**************************************************************************/
- /* Delete line from Main Configuration */
- /**************************************************************************/
- DeleteMain:
-
- list ID CYALL ATTRS MUIA_List_Active
- mainpos=result
-
- list ID CYALL POS mainpos
- oldline=result
- oldparm=upper(strip(word(oldline,1),'B'))
- errflag=FALSE
-
- select
- when oldline=_text._fldheader then errflag=TRUE
- when oldline=_text._rulheader then errflag=TRUE
- when oldparm=_text._pasheader then errflag=TRUE
- when index(oldline,_text._yamheader)>0 then errflag=TRUE
- otherwise do
- list ID CYALL REMOVE POS mainpos
- end
- end
-
- if errflag then do
- errmsg=_text._protected
- Call ErrorMsg
- exit
- end
-
- Return
-
- /**************************************************************************/
- /* Edit Main Configuration */
- /**************************************************************************/
- EditMain:
-
- list ID CYALL ATTRS MUIA_List_Active
- mainpos=result
-
- list ID CYALL POS mainpos
- oldline=result
- oldparm=upper(strip(word(oldline,1),'B'))
- errflag=FALSE
-
- select
- when oldline=_text._fldheader then errflag=TRUE
- when oldline=_text._rulheader then errflag=TRUE
- when oldparm=_text._pasheader then errflag=TRUE
- when index(oldline,_text._yamheader)>0 then errflag=TRUE
- otherwise do
- string ID CYMCS CONTENT oldline
- end
- end
-
- if errflag then do
- errmsg=_text._protected
- Call ErrorMsg
- exit
- end
-
-
- Return
-
- /**************************************************************************/
- /* Insert New folder in Config */
- /**************************************************************************/
- InsertMain:
-
-
- list ID CYALL ATTRS MUIA_List_Active
- mainpos=result+1
-
- string ID CYMCS
- mainentry=result
-
- list ID CYALL INSERT POS mainpos STRING '='mainentry
-
- Return
-
- /**************************************************************************/
- /* Store Main Configuration Entry */
- /**************************************************************************/
- StoreMain:
-
- string ID CYMCS
- mainentry=result
- list ID CYALL ATTRS MUIA_List_Active
- mainpos=result
- list ID CYALL POS mainpos STRING '='mainentry
-
- Return
-
- /**************************************************************************/
- /* Delete a folder from the Config */
- /**************************************************************************/
- DeleteFlds:
-
- list ID CYFLD ATTRS MUIA_List_Active
- fldpos=result
- if fldpos<4 then do
- errmsg=_text._baddelete
- Call ErrorMsg
- end
- else do
- list ID CYFLD REMOVE POS fldpos
- end
-
- Return
-
- /**************************************************************************/
- /* Edit Folder Entry */
- /**************************************************************************/
- EditFlds:
-
- list ID CYFLD ATTRS MUIA_List_Active
- fldpos=result
- list ID CYFLD POS fldpos
- oldline=result
- parse var oldline ftype ',' fsort ',' ffile ',' fname ',' oldnum
- string ID CYFL1 CONTENT fsort
- string ID CYFL2 CONTENT ffile
- string ID CYFL3 CONTENT fname
-
- Return
-
- /**************************************************************************/
- /* Insert New folder in Config */
- /**************************************************************************/
- InsertFlds:
-
- ftype=2
-
- list ID CYFLD ATTRS MUIA_List_Entries
- oldnum=result+1
-
- list ID CYFLD ATTRS MUIA_List_Active
- fldpos=result+1
-
- if fldpos<4 then fldpos=4 /* force after system folders */
-
- string ID CYFL1
- fsort=result
-
- string ID CYFL2
- ffile=result
-
- string ID CYFL3
- fname=result
-
- newline=ftype||comma||fsort||comma||ffile||comma||fname
-
- list ID CYFLD INSERT POS fldpos STRING newline
-
- Return
-
- /**************************************************************************/
- /* Store Folder Entry */
- /**************************************************************************/
- StoreFlds:
-
- list ID CYFLD ATTRS MUIA_List_Active
- fldpos=result
- list ID CYFLD POS fldpos
- oldline=result
- parse var oldline ftype ',' fsort ',' ffile ',' fname ',' oldnum
-
- select
- when subparm=1 then do
- string ID CYFL1
- newfsort=result
- if newfsort>=0 & newfsort<=3 then fsort=newfsort
- end
- when subparm=2 then do
- popasl ID CYMDR
- maildir=strip(result,'B')
- if maildir='' | maildir='RESULT' | ~exists(maildir) then do
- errmsg=_text._badmaildir
- Call ErrorMsg
- exit
- end
- else do
- lastchar=substr(maildir,length(maildir),1)
- if verify(':/',lastchar,'MATCH')=0 then maildir=maildir||'/'
- end
- string ID CYFL2
- newffile=result
-
- if pos(':',ffile)=0 then tffile=maildir||ffile
- else tffile=ffile
- if pos(':',newffile)=0 then tnewffile=maildir||newffile
- else tnewffile=newffile
- select
- when strip(newffile,'B')='' then nop
- when exists(tnewffile) & upper(tffile)~=upper(tnewffile) then do
- errmsg=_text._newexists
- Call ErrorMsg
- exit
- end
- when strip(ffile,'B')='' & ~exists(tnewffile) then ffile=tnewffile
- when ~exists(tffile) & ~exists(tnewffile) then ffile=tnewffile
- when exists(tffile) & upper(newffile)~=upper(ffile) then do
- request ID CYREN GADGETS _text._renreq STRING _title._rename
- if result=1 then do
- address command 'Rename >nil: 'tffile tnewffile ' QUIET'
- if rc=0 then do
- ffile=tnewffile
- end
- else do
- errmsg=_text._badrename||rc
- Call ErrorMsg
- exit
- end
- end
- else do
- signal StoreFoldEnd
- end
- end
- otherwise nop
- end
- end /* end of when subparm=2 condition */
-
- when subparm=3 then do
- string ID CYFL3
- fname=result
- end
- otherwise nop
- end
-
- newline=ftype||comma||fsort||comma||ffile||comma||fname
- list ID CYFLD ATTRS MUIA_List_Active
- fldpos=result
- list ID CYFLD POS fldpos STRING newline
-
- StoreFoldEnd:
-
- Return
-
- /* clone for rules */
- /**************************************************************************/
- /* Delete a Filter from the Config */
- /**************************************************************************/
- DeleteRuls:
-
- list ID CYRLL ATTRS MUIA_List_Active
- rulpos=result
- list ID CYRLL REMOVE POS rulpos
-
- Return
-
- /**************************************************************************/
- /* Edit Filter Entry */
- /**************************************************************************/
- EditRuls:
-
- list ID CYRLL ATTRS MUIA_List_Active
- rulpos=result
- list ID CYRLL POS rulpos
- oldline=result
- parse var oldline rl1 ',' rl2 ',' rl3 ',' rl4 ',' rl5 ',' rl6 ',' rl7 ',' rl8 ',' rl9
-
- string ID CYRL1 CONTENT strip(rl1,'B')
- string ID CYRL2 CONTENT strip(rl2,'B')
- string ID CYRL3 CONTENT strip(rl3,'B')
- string ID CYRL4 CONTENT strip(rl4,'B')
- string ID CYRL5 CONTENT strip(rl5,'B')
- string ID CYRL6 CONTENT strip(rl6,'B')
- string ID CYRL7 CONTENT strip(rl7,'B')
- string ID CYRL8 CONTENT strip(rl8,'B')
- string ID CYRL9 CONTENT strip(rl9,'B')
-
- Return
-
- /**************************************************************************/
- /* Insert New Filter in Config */
- /**************************************************************************/
- InsertRuls:
-
- ftype=2
-
- list ID CYRLL ATTRS MUIA_List_Entries
- oldnum=result+1
-
- string ID CYRL1
- rl1=result
-
- string ID CYRL2
- rl2=result
-
- string ID CYRL3
- rl3=result
-
- string ID CYRL4
- rl4=result
-
- string ID CYRL5
- rl5=result
-
- string ID CYRL6
- rl6=result
-
- string ID CYRL7
- rl7=result
-
- string ID CYRL8
- rl8=result
-
- string ID CYRL9
- rl9=result
-
- newline=rl1||comma||rl2||comma||rl3||comma||rl4||comma||rl5||comma||rl6||comma||rl7||comma||rl8||comma||rl9
-
- list ID CYRLL INSERT POS rulpos STRING newline
-
- Return
-
- /**************************************************************************/
- /* Store Filter Entry */
- /**************************************************************************/
- StoreRuls:
-
- list ID CYRLL ATTRS MUIA_List_Active
- rulpos=result
-
- list ID CYRLL POS rulpos
- oldline=result
-
- parse var oldline rl1 ',' rl2 ',' rl3 ',' rl4 ',' rl5 ',' rl6 ',' rl7 ',' rl8 ',' rl9
-
- select
- when subparm=1 then do
- string ID CYRL1
- rl1=strip(upper(result),'B')
- end
- when subparm=2 then do
- string ID CYRL2
- rl2=strip(result,'B')
- end
- when subparm=3 then do
- string ID CYRL3
- rl3=strip(result,'B')
- end
- when subparm=4 then do
- string ID CYRL4
- rl4=strip(upper(result),'B')
- end
- when subparm=5 then do
- string ID CYRL5
- rl5=strip(upper(result),'B')
- end
- when subparm=6 then do
- string ID CYRL6
- rl6=strip(result,'B')
- end
- when subparm=7 then do
- string ID CYRL7
- rl7=strip(result,'B')
- end
- when subparm=8 then do
- string ID CYRL8
- rl8=strip(result,'B')
- end
- when subparm=9 then do
- string ID CYRL9
- rl9=strip(result,'B')
- end
- otherwise nop
- end
-
- newline=rl1||comma||rl2||comma||rl3||comma||rl4||comma||rl5||comma||rl6||comma||rl7||comma||rl8||comma||rl9
-
- list ID CYRLL ATTRS MUIA_List_Active
- rulpos=result
-
- list ID CYRLL POS rulpos STRING newline
-
- StoreRuleEnd:
-
- Return
-
- /**************************************************************************/
- /* Get Filename for SAVEAS */
- /**************************************************************************/
- GetFileName:
-
- popasl ID CYCFG
- configfile=result
-
- savfile=''
- select
- when lastpos('/',configfile)>0 then do
- savdir=substr(configfile,1,lastpos('/',configfile)-1)
- end
- when lastpos(':',configfile)>0 then do
- savdir=substr(configfile,1,lastpos(':',configfile))
- end
- otherwise do
- savdir="""T:"""
- end
- end
-
- aslrequest ID CYWIN TITLE _title._asl,
- ATTRS ASLFR_InitialDrawer savdir ASLFR_InitialFile savfile
-
- if rc = 0 then do
- configfile=result
- popasl ID CYCFG content configfile
- end
- else do
- exit
- end
-
- Return
-
- /**************************************************************************/
- /* Save Configuration */
- /**************************************************************************/
- SaveConfig:
-
- popasl ID CYCFG
- configfile=result
-
- if ~open('OUT',configfile,'W') then do
- errmsg=_text._badsavefile
- Call ErrorMsg
- exit
- end
-
- infotext=_text._savingfile
- infobuttons=''
- showbusy=TRUE
- Call InfoWindow
-
- list ID CYALL ATTRS MUIA_List_Entries
- acnt=result
-
- list ID CYFLD ATTRS MUIA_List_Entries
- ocnt=result
-
- list ID CYRLL ATTRS MUIA_List_Entries
- rcnt=result
-
- do i=0 to acnt-1
- list ID CYALL POS i
- lineout=result
- select
- when lineout=_text._fldheader then do
- do j=0 to ocnt-1
- list ID CYFLD POS j
- lineout=result
- parse var lineout ftype ',' fsort ',' ffile ',' fname ',' oldnum
- lineout=ftype||';'||fsort||';'||ffile||';'||fname
- fldnum='Folder'||j
- lineout=left(fldnum,16,' ')||'='||lineout
- foo=writeln('OUT',lineout)
- end
- end
- when lineout=_text._rulheader then do
- do j=0 to rcnt-1
- list ID CYRLL POS j
- lineout=result
- lineout=translate(lineout,';',',')
- rulnum='Rule'||j
- lineout=left(rulnum,16,' ')||'= '||lineout
- foo=writeln('OUT',lineout)
- end
- end
- otherwise do
- foo=writeln('OUT',lineout)
- end
- end
- end
-
- foo=close('OUT')
- window ID CYINF close
-
- Return
-
- /**************************************************************************/
- /* Make sure there isn't one running already. */
- /**************************************************************************/
- CheckDup:
-
- list ID CYALL ATTRS MUIA_List_Entries
- if result~='RESULT' then do
- errmsg=_text._secondrun
- Call ErrorMsg
- exit
- end
-
- Return
-
- /******************************************************************************/
- /* Display ERROR message and EXIT. */
- /******************************************************************************/
- ErrorMsg:
-
- window ID CYERR CLOSE
-
- request ID ERRM GADGETS _text._ok errmsg
-
- exit
-
- Return
-
- /******************************************************************************/
- /* Display ConfigYam window. */
- /******************************************************************************/
- BuildWindow:
-
- window ID CYWIN TITLE _title._main,
- COMMAND '"ConfigYam.rexx QUIT"'
-
- group
- group HORIZ
- popasl ID CYCFG HELP help.CYCFG CONTENT Yconfig
- popasl ID CYMDR HELP help.CYMDR CONTENT maildir
- button ID CYPR0 COMMAND '"ConfigYam.rexx LOAD"',
- HELP help.CYPR0,
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYPR0
- button ID CYPR3 HELP help.CYPR3,
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYPR3
- button ID CYPR4 HELP help.CYPR4,
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYPR4
- endgroup
-
- /* list for main configuration */
-
- group ID CYMCC ATTRS MUIA_ShowMe FALSE
- list ID CYALL HELP help.CYALL,
- COMMAND '"ConfigYam.rexx EDITMAIN"'
- group HORIZ
- string ID CYMCS HELP help.CYMCS,
- COMMAND '"ConfigYam.rexx STOREMAIN"'
- button ID CYMCZ HELP help.CYMCZ,
- COMMAND '"ConfigYam.rexx DELETEMAIN"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYMCZ
- button ID CYMCI HELP help.CYMCI,
- COMMAND '"ConfigYam.rexx INSERTMAIN"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYMCI
- button ID CYMCX HELP help.CYMCX,
- ATTRS MUIA_HorizWeight 10,
- LABEL _label._CYMCX
- endgroup
- endgroup
-
- /* list for filter rules */
-
- group ID CYRUL
- list ID CYRLL HELP help.CYRLL,
- ATTRS MUIA_Listview_DragType MUIV_Listview_DragType_Immediate,
- MUIA_List_ShowDropMarks TRUE,
- MUIA_List_DragSortable TRUE,
- MUIA_Dropable TRUE,
- MUIA_List_Format """BAR,BAR,BAR,BAR,BAR,BAR,BAR,BAR,"""
- group HORIZ
- string ID CYRL1 HELP help.CYRL1,
- COMMAND '"ConfigYam.rexx STORERUL 1"',
- ATTRS MUIA_HorizWeight 5 MUIA_String_Accept yesno,
- MUIA_CycleChain TRUE
- string ID CYRL2 HELP help.CYRL2,
- COMMAND '"ConfigYam.rexx STORERUL 2"',
- ATTRS MUIA_HorizWeight 200 MUIA_CycleChain TRUE
- string ID CYRL3 HELP help.CYRL3,
- COMMAND '"ConfigYam.rexx STORERUL 3"',
- ATTRS MUIA_HorizWeight 5 MUIA_String_Accept optnums,
- MUIA_CycleChain TRUE
- string ID CYRL4 HELP help.CYRL4,
- COMMAND '"ConfigYam.rexx STORERUL 4"',
- ATTRS MUIA_HorizWeight 5 MUIA_String_Accept yesno,
- MUIA_CycleChain TRUE
- string ID CYRL5 HELP help.CYRL5,
- COMMAND '"ConfigYam.rexx STORERUL 5"',
- ATTRS MUIA_HorizWeight 5 MUIA_String_Accept yesno,
- MUIA_CycleChain TRUE
- string ID CYRL6 HELP help.CYRL6,
- COMMAND '"ConfigYam.rexx STORERUL 6"',
- ATTRS MUIA_HorizWeight 200 MUIA_CycleChain TRUE
- string ID CYRL7 HELP help.CYRL7,
- COMMAND '"ConfigYam.rexx STORERUL 7"',
- ATTRS MUIA_HorizWeight 5 MUIA_String_Accept optnums,
- MUIA_CycleChain TRUE
- string ID CYRL8 HELP help.CYRL8,
- COMMAND '"ConfigYam.rexx STORERUL 8"',
- ATTRS MUIA_HorizWeight 200 MUIA_CycleChain TRUE
- string ID CYRL9 HELP help.CYRL9,
- COMMAND '"ConfigYam.rexx STORERUL 9"',
- ATTRS MUIA_HorizWeight 200 MUIA_CycleChain TRUE
- endgroup
- group HORIZ
- space HORIZ
- button ID CYRLZ HELP help.CYRLZ,
- COMMAND '"ConfigYam.rexx DELETERUL"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYRLZ
- button ID CYRLI HELP help.CYRLI,
- COMMAND '"ConfigYam.rexx INSERTRUL"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYRLI
- button ID CYRLX HELP help.CYRLX,
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYRLX
- endgroup
- endgroup
-
- /* list for folders */
-
- group ID CYFLG
- list ID CYFLD HELP help.CYFLD,
- ATTRS MUIA_Listview_DragType MUIV_Listview_DragType_Immediate,
- MUIA_List_ShowDropMarks TRUE,
- MUIA_List_DragSortable TRUE,
- MUIA_Dropable TRUE,
- MUIA_List_Format """WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,BAR,BAR,,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0"""
- group HORIZ
- string ID CYFL1 HELP help.CYFL1,
- COMMAND '"ConfigYam.rexx STOREFLD 1"',
- ATTRS MUIA_HorizWeight 10 MUIA_String_Accept sortnums,
- MUIA_CycleChain TRUE
- string ID CYFL2 HELP help.CYFL2,
- COMMAND '"ConfigYam.rexx STOREFLD 2"',
- ATTRS MUIA_HorizWeight 100 MUIA_CycleChain TRUE
- string ID CYFL3 HELP help.CYFL3,
- COMMAND '"ConfigYam.rexx STOREFLD 3"',
- ATTRS MUIA_HorizWeight 100 MUIA_CycleChain TRUE
- button ID CYFLZ HELP help.CYFLZ,
- COMMAND '"ConfigYam.rexx DELETEFLD"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYFLZ
- button ID CYFLI HELP help.CYFLI,
- COMMAND '"ConfigYam.rexx INSERTFLD"',
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYFLI
- button ID CYFLX HELP help.CYFLX,
- ATTRS MUIA_HorizWeight 20,
- LABEL _label._CYFLX
- endgroup
- endgroup
- endgroup
- group HORIZ
- button ID CYPR1 COMMAND '"ConfigYam.rexx SAVE"',
- HELP help.CYPR1,
- LABEL _label._CYPR1
- button ID CYPR2 COMMAND '"ConfigYam.rexx SAVEAS"',
- HELP help.CYPR2,
- LABEL _label._CYPR2
- space
- button ID CYPRQ COMMAND '"ConfigYam.rexx QUIT"',
- HELP help.CYPRQ,
- LABEL _label._CYPRQ
- endgroup
-
- endwindow
-
- callhook ID CYPR3 PRESS PORT INLINE,
- COMMAND """options results;
- Address CONFIGYAM;
- group ID CYRUL ATTRS " MUIA_ShowMe TRUE";
- group ID CYFLG ATTRS " MUIA_ShowMe TRUE";
- group ID CYMCC ATTRS " MUIA_ShowMe FALSE";"""
-
- callhook ID CYPR4 PRESS PORT INLINE,
- COMMAND """options results;
- Address CONFIGYAM;
- group ID CYMCC ATTRS " MUIA_ShowMe TRUE";
- group ID CYRUL ATTRS " MUIA_ShowMe FALSE";
- group ID CYFLG ATTRS " MUIA_ShowMe FALSE";"""
-
- callhook ID CYMCX PRESS PORT INLINE,
- COMMAND """options results;
- Address CONFIGYAM;
- group ID CYRUL ATTRS " MUIA_ShowMe TRUE";
- group ID CYFLG ATTRS " MUIA_ShowMe TRUE";
- group ID CYMCC ATTRS " MUIA_ShowMe FALSE";"""
-
- callhook ID CYFLX PRESS PORT INLINE,
- COMMAND """options results;
- Address CONFIGYAM;
- group ID CYRUL ATTRS " MUIA_ShowMe TRUE";
- group ID CYFLG ATTRS " MUIA_ShowMe FALSE";"""
-
- callhook ID CYRLX PRESS PORT INLINE,
- COMMAND """options results;
- Address CONFIGYAM;
- group ID CYFLG ATTRS " MUIA_ShowMe TRUE";
- group ID CYRUL ATTRS " MUIA_ShowMe FALSE";"""
-
- callhook ID CYFLD PRESS COMMAND '"ConfigYam.rexx EDITFLD"'
- callhook ID CYRLL PRESS COMMAND '"ConfigYam.rexx EDITRUL"'
-
- Return
-
-
- /******************************************************************************/
- /* Simple information/error message window. */
- /******************************************************************************/
- InfoWindow:
-
- window ID CYINF TITLE _title._info
-
- group
- group
- text ID STEXT HELP help.STEXT LABEL infotext
- endgroup
- if showbusy then do
- group
- object CLASS '"Busy.mcc"' ATTRS MUIA_VertWeight 25
- endgroup
- end
- if infobuttons ~='' then do
- group HORIZ
- group
- space HORIZ
- endgroup
- group
- radio ID SQUIT HELP help.SQUIT LABELS infobuttons
- endgroup
- group
- space HORIZ
- endgroup
- endgroup
- end
- else do
- group
- space HORIZ 100
- endgroup
- end
- endgroup
- endwindow
-
- Return
-
- /******************************************************************************/
- /* MUIREXX TAGS & VARIABLES */
- /******************************************************************************/
- Muivars:
-
- MUIA_CycleChain = 0x80421ce7
- MUIA_Disabled = 0x80423661
- MUIA_Draggable = 0x80420b6e
- MUIA_Dropable = 0x8042fbce
- MUIA_HorizWeight = 0x80426db9
- MUIA_List_Active = 0x8042391c
- MUIA_List_DragSortable = 0x80426099
- MUIA_List_Format = 0x80423c0a
- MUIA_List_Entries = 0x80421654
- MUIA_List_Quiet = 0x8042d8c7
- MUIA_List_ShowDropMarks = 0x8042c6f3
- MUIA_List_Visible = 0x8042191f
- MUIA_Listview_DragType = 0x80425cd3
- MUIA_Listview_MultiSelect = 0x80427e08
- MUIA_Selected = 0x8042654b
- MUIA_ShowMe = 0x80429ba8
- MUIA_String_Accept = 0x8042e3e1
- MUIA_VertWeight = 0x804298d0
- MUIA_Weight = 0x80421d1f
- MUIA_Window_DepthGadget = 0x80421923
- MUIA_Window_PublicScreen = 0x804278e4
-
- ASLFR_InitialFile = 0x80080008
- ASLFR_InitialDrawer = 0x80080009
-
- MUIM_List_Clear = 0x8042ad89
- MUIM_List_Select = 0x804252d8
-
- TRUE=1
- FALSE=0
-
- MUIV_List_Insert_Bottom = -3
- MUIV_List_Select_Off = 0
- MUIV_List_Select_On = 1
- MUIV_Listview_DragType_Immediate = 1
- MUIV_Listview_MultiSelect_Shifted = 2
-
- Return
-
- /**************************************************************************/
- /* Various values used throughout the various routines */
- /**************************************************************************/
- CYvars:
-
- missing='.'
- comma=','
- tab='09'x /* tab character */
- sortnums='"=0123"' /* valid sort numbers */
- yesno='"ynYN"' /* only Y or N valid */
- optnums='"=012"' /* rule options */
- bo='\033b' /* print control BOLD */
- bc='\033b\033c' /* print control BOLD CENTER */
-
- yconfig="Yam:.config"
- maildir="Yam:"
-
- _text._fldheader="ConfigYam..Insert FOLDERS here"
- _text._rulheader="ConfigYam..Insert RULES here"
- _text._yamheader="YAM Configuration"
- _text._pasheader="POP3-PASSWORD"
-
- Return
-
- /**************************************************************************/
- /* Messages, text, etc. constructed using previously defined values */
- /**************************************************************************/
- Builtvars:
-
- _title._CYALL='"'||bc||_label._cyall'"'
- _title._cyfld='"'||bc||_label._cyfld'"'
- _text._renreq='"'||_text._ok||'|'||_text._cancel'"'
-
- Return
-
- /**************************************************************************/
- /* Pointers into the xxxx.guide documentation */
- /**************************************************************************/
- Helpvars:
-
- Return
-
- /**************************************************************************/
- /* Mui Gadgets, text, msgs, etc. used in ConfigYam */
- /**************************************************************************/
- Localize:
-
- /*********************************/
- /* Miscellaneous info strings */
- /*********************************/
- _title._main="""ConfigYam v1.2""" /* main screen title */
- _title._info="""ConfigYam Info""" /* default title on infomsg */
- _title._asl="""Select File""" /* title for ASL requester */
- _title._rename="Rename Folder?" /* title for ASL requester */
-
- _text._ok="Ok" /* various OK buttons */
- _text._cancel="Cancel" /* LABEL for CANCEL button */
-
- _label._cypr0="Load" /* label for LOAD button */
- _label._cypr1="Save" /* label for SAVE button */
- _label._cypr2="SaveAs" /* label for SAVEAS button */
- _label._cyprq="Quit" /* label for QUIT button */
- _label._cypr3="Show"
- _label._cypr4="ShowM" /* show main config list */
- _label._cyfli="Insert"
- _label._cyflx="Hide"
- _label._cyflz="Delete"
- _label._cyrli="Insert"
- _label._cyrlx="Hide"
- _label._cyrlz="Delete"
- _label._cymci="Insert"
- _label._cymcx="Hide"
- _label._cymcz="Delete"
-
- _text._savingfile="Saving Configuration File..." /* saving file message */
- _text._loadfile="Preparing Configuration File..." /* preparing file msg */
-
- /*********************************/
- /* Various error conditions */
- /*********************************/
-
- _text._baddelete="You can not delete System Folders"
- _text._badfile="Cannot open the Configuration file"
- _text._badmaildir="Select valid mail directory"
- _text._badparm="Unrecognized parms passed to ConfigYam:"
- _text._badrename="Rename failed..Return Code="
- _text._newexists="New filename already exists"
- _text._badsavefile="Unable to open output file"
- _text._protected ="You cannot edit THIS line"
- _text._secondrun="You ALREADY have a ConfigYam started" /* second run */
-
- /**************************************************************************/
- /* Help Messages to display with MUI bubble facility. */
- /* */
- /* Format is simple: help.ID where ID is the id specified on the MUI */
- /* object statement. */
- /* Similar approach for accessing the .guide information using the NODE */
- /* option on the object statement. */
- /* */
- /**************************************************************************/
-
- help.SQUIT=""""""
- help.STEXT=""""""
- help.CYCFG="""Select Yam Configuration File"""
- help.CYMDR="""Select mail directory"""
- help.CYALL="""Double-click to edit entry\nKNOW what you are doing"""
- help.CYFLD="""Folder List\nDrag-n-drop to reorder\nDouble-click to edit entry\nLEAVE first 4 alone"""
- help.CYMCS="""Edit entry for main configuration\nPress Return to update active entry"""
- help.CYFL1="""Sort Order\n0=New ones first\n1=Old ones first\n2=Sender\n3=Subject"""
- help.CYFL2="""Actual filename of folder\nThose without path are assumed\nto be in the selected mail directory"""
- help.CYFL3="""Folder name"""
- help.CYRL1="""Filter enabled (Y/N)"""
- help.CYRL2="""Filter Name"""
- help.CYRL3="""Filter field\n0=From\n1=To\n2=Subject"""
- help.CYRL4="""Match condition Case sensitive (Y/N)"""
- help.CYRL5="""Match condition if NOT true (Y/N)"""
- help.CYRL6="""Match condition for filtering"""
- help.CYRL7="""Action on match\n0=Move to\n1=Delete\n2=Forward only"""
- help.CYRL8="""Move to folder"""
- help.CYRL9="""Forward to address/alias"""
- help.CYRLI="""Insert New Rule"""
- help.CYRLL="""Filter List\nDrag-n-drop to reorder\nDouble-click to edit entry"""
- help.CYRLX="""Hide Rule List\nShow Folder List"""
- help.CYRLZ="""Delete Rule from Yam Configuration"""
- help.CYPR3="""Show Rule List\nShow Folder List\nHide Main List"""
- help.CYPR4="""Show Main Config\nHide Folder List\nHide Rule List"""
- help.CYFLI="""Insert New Folder"""
- help.CYFLX="""Hide Folder List\nShow Rule List"""
- help.CYFLZ="""Delete Folder from Yam Configuration"""
- help.CYMCI="""Insert new line in Yam configuration"""
- help.CYMCX="""Hide Main Config\nShow Folder List\nShow Rule List"""
- help.CYMCZ="""Delete line from Yam Configuration"""
- help.CYPR0="""Load selected configuration file"""
- help.CYPR1="""Save selected configuration file"""
- help.CYPR2="""Save configuration to a new file"""
- help.CYPRQ="""Quit"""
-
- Return
-
-
-
-